<?php
// +----------------------------------------------------------------------
// | 07FLYCRM [基于ThinkPHP5.0开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2016-2021 http://www.07fly.xyz
// +----------------------------------------------------------------------
// | Professional because of focus  Persevering because of happiness
// +----------------------------------------------------------------------
// | Author: 开发人生 <goodkfrs@qq.com>
// +----------------------------------------------------------------------

namespace app\workflow\validate;

use app\workflow\validate\WorkflowBase;

/**
 * 业务关联表=》验证器
 */
class WorkflowBusinessHistory extends WorkflowBase
{

    // 验证规则
    protected $rule =   [

        'business_type'      => 'require',
        'business_id'      => 'require',
        'workflow_id'      => 'require',
        'curr_node_id'      => 'require',
        'next_node_id'      => 'require',
        'deal_user_id'      => 'require',
        'deal_user_name'      => 'require',

    ];

    // 验证提示
    protected $message  =   [

        'business_id.require'      => '关联业务编号不能为空',
        'business_type.require'      => '关联业务类型不能为空',
        'workflow_id.require'      => '流程编号不能为空',
        'curr_node_id.require'      => '当前节点不能为空',
        'next_node_id.require'      => '下一节点不能为空',
        'deal_user_id.require'      => '处理人编号不能为空',
        'deal_user_name.require'      => '处理人名称不能为空',
    ];

    // 应用场景
    protected $scene = [

        'add'       =>  ['business_id','business_type','workflow_id','curr_node_id','next_node_id','deal_user_id','deal_user_name'],
        'edit'       =>  ['business_id','business_type','workflow_id','curr_node_id','next_node_id','deal_user_id','deal_user_name'],
    ];

}
